function OutputGrid=VecFun_LogDiffGridConversion(Grid_min,Grid_max,Grid_num,Grid_curvature,InputGrid,InputType)

switch InputType
    case 'LogDiff'
        if Grid_curvature==0
            Unit        =   (Grid_max-Grid_min)/(Grid_num-1);
            OutputGrid  =   1+(InputGrid-Grid_min)/Unit;
        else
            Multi       =   exp(Grid_curvature);
            Unit        =   (Grid_max-Grid_min)*(1-Multi)/(1-Multi^(Grid_num-1));
            OutputGrid  =   1+log( 1-(InputGrid-Grid_min)/Unit*(1-Multi) )/log(Multi);
        end
    case 'LinDiff'
        if Grid_curvature==0
            Unit        =   (Grid_max-Grid_min)/(Grid_num-1);
            OutputGrid  =   (InputGrid-1)*Unit+Grid_min;
        else
            Multi       =   exp(Grid_curvature);
            Unit        =   (Grid_max-Grid_min)*(1-Multi)/(1-Multi^(Grid_num-1));
            OutputGrid  =   Grid_min+Unit*( 1-Multi.^(InputGrid-1) )/(1-Multi);
        end
end


